using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Hydrology
{
    /// <summary>
    /// <para>Stream to Feature</para>
    /// <para>Converts a raster representing a linear network to features representing the linear network.</para>
    /// <para>将表示线性网络的栅格转换为表示线性网络的要素。</para>
    /// </summary>    
    [DisplayName("Stream to Feature")]
    public class StreamToFeature : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public StreamToFeature()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_stream_raster">
        /// <para>Input stream raster</para>
        /// <para>An input raster that represents a linear stream network.</para>
        /// <para>表示线性流网络的输入栅格。</para>
        /// </param>
        /// <param name="_in_flow_direction_raster">
        /// <para>Input flow direction raster</para>
        /// <para><xdoc>
        ///   <para>The input raster that shows the direction of flow out of each cell.</para>
        ///   <para>The flow direction raster can be created using the Flow Direction tool.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>显示流出每个像元的方向的输入栅格。</para>
        ///   <para>可以使用流向工具创建流向栅格。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_polyline_features">
        /// <para>Output polyline features</para>
        /// <para>Output feature class that will hold the converted streams.</para>
        /// <para>将保存转换后的流的输出要素类。</para>
        /// </param>
        public StreamToFeature(object _in_stream_raster, object _in_flow_direction_raster, object _out_polyline_features)
        {
            this._in_stream_raster = _in_stream_raster;
            this._in_flow_direction_raster = _in_flow_direction_raster;
            this._out_polyline_features = _out_polyline_features;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Stream to Feature";

        public override string CallName => "sa.StreamToFeature";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYDomain", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "autoCommit", "configKeyword", "extent", "geographicTransformations", "maintainSpatialIndex", "mask", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "scratchWorkspace", "snapRaster", "workspace"];

        public override object[] ParameterInfo => [_in_stream_raster, _in_flow_direction_raster, _out_polyline_features, _simplify.GetGPValue()];

        /// <summary>
        /// <para>Input stream raster</para>
        /// <para>An input raster that represents a linear stream network.</para>
        /// <para>表示线性流网络的输入栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input stream raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_stream_raster { get; set; }


        /// <summary>
        /// <para>Input flow direction raster</para>
        /// <para><xdoc>
        ///   <para>The input raster that shows the direction of flow out of each cell.</para>
        ///   <para>The flow direction raster can be created using the Flow Direction tool.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>显示流出每个像元的方向的输入栅格。</para>
        ///   <para>可以使用流向工具创建流向栅格。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input flow direction raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_flow_direction_raster { get; set; }


        /// <summary>
        /// <para>Output polyline features</para>
        /// <para>Output feature class that will hold the converted streams.</para>
        /// <para>将保存转换后的流的输出要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output polyline features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_polyline_features { get; set; }


        /// <summary>
        /// <para>Simplify polylines</para>
        /// <para><xdoc>
        ///   <para>Specifies whether weeding is used.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The feature is weeded to reduce the number of vertices. The Douglas-Puecker algorithm for line generalization is used with a tolerance of sqrt(0.5) * cell size.</bullet_item><para/>
        ///     <bullet_item>Unchecked—No weeding is applied.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>By default, weeding is applied.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否使用除草。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 除草要素以减少折点数。用于线泛化的 Douglas-Puecker 算法的容差为 sqrt（0.5） * 像元大小。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不应用除草。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>默认情况下，应用除草。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Simplify polylines")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _simplify_value _simplify { get; set; } = _simplify_value._true;

        public enum _simplify_value
        {
            /// <summary>
            /// <para>SIMPLIFY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SIMPLIFY")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_SIMPLIFY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_SIMPLIFY")]
            [GPEnumValue("false")]
            _false,

        }

        public StreamToFeature SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYDomain = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, int? autoCommit = null, object configKeyword = null, object extent = null, object geographicTransformations = null, bool? maintainSpatialIndex = null, object mask = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, object scratchWorkspace = null, object snapRaster = null, object workspace = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYDomain: XYDomain, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, autoCommit: autoCommit, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, maintainSpatialIndex: maintainSpatialIndex, mask: mask, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, workspace: workspace);
            return this;
        }

    }

}